#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <cstdio>
#include <string>
#include <stack>
#include <set>
#define IOS ios::sync_with_stdio(false), cin.tie(0)
using namespace std;
typedef long long ll;
ll a[300][300],dp[300][300];
ll n,m,k;
ll bestv;
void f(ll hl,ll hr){
    if(hl>hr)return ;
    ll h=(hl+hr)>>1;
        // bool flag1=false;
        ll wl=1,wr=m;
        while(wr>=wl){
            ll w=(wl+wr)>>1;
            if(h*w<=bestv){
                wl=w+1;
                continue;
            }
            bool flag2=false;
            for(ll i=1;i+h-1<=n&&!flag2;i++){
                for(ll j=1;j+w-1<=m;j++){
                    ll x=i+h-1;
                    ll y=j+w-1;
                    if(dp[x][y]-dp[x][j-1]-dp[i-1][y]+dp[i-1][j-1]<=k){
                        flag2=true;
                        // cout<<x<<" "<<y<<" "<<i<<" "<<j<<endl;
                        break;
                    }
                }
            }
            if(flag2){
                bestv=h*w;
                wl=w+1;
            }
            else wr=w-1;
        }
        f(hl,h-1);
        f(h+1,hr);
        return ;
}

int main()
{
    IOS;
    cin>>n>>m>>k;
    for(ll i=1;i<=n;i++){
        for(ll j=1;j<=m;j++){
            cin>>a[i][j];
        }
    }   
    dp[0][0]=0; 
    for(ll i=1;i<=n;i++)dp[i][0]=0;
    for(ll j=1;j<=m;j++)dp[0][j]=0;
    for(ll i=1;i<=n;i++){
        for(ll j=1;j<=m;j++){
            dp[i][j]=dp[i-1][j]+dp[i][j-1]-dp[i-1][j-1]+a[i][j];
            // cout<<"dp["<<i<<"]["<<j<<"]="<<dp[i][j]<<endl;
        }
    }
    bestv=-1;
    ll hl=1,hr=n;
    f(hl,hr);
    cout<<bestv<<endl;

    getchar();
    getchar();
    return 0;
}
